<?php

use Illuminate\Support\Facades\Route;
//

//不需要登录
Route::post('/login',   'AuthController@login')->name('api.auth.login');//登录
Route::get ('/captcha',   'AuthController@captcha')->name('api.auth.captcha');//验证码
Route::group(['middleware'=>'auth:admin'], function() {
    //上传
    Route::group(['prefix' => 'upload'], function(){
        Route::post('/image', 'UploadController@image')->name('api.upload.image');//图片
        Route::post('/file', 'UploadController@file')->name('api.upload.file');//文件
    });
    //管理人员
    Route::group(['prefix' => 'manager'], function(){
        Route::get ('/','ManagerController@index')->name('api.manage.index');//列表
        Route::post('/update', 'ManagerController@update')->name('api.manage.update');//更新
        Route::post('/destroy', 'ManagerController@destroy')->name('api.manage.destroy');//删除
        Route::post('/lock', 'ManagerController@lock')->name('api.manage.lock');//锁定
        Route::post('/active', 'ManagerController@active')->name('api.manage.active');//激活
    });
    //广告管理
    Route::group(['prefix' => 'adsense'], function(){
        Route::get ('/','AdsenseController@index')->name('api.adsense.index');//列表
        Route::post('/update', 'AdsenseController@update')->name('api.adsense.update');//更新
        Route::post('/destroy', 'AdsenseController@destroy')->name('api.adsense.destroy');//删除
        Route::post('/lock', 'AdsenseController@lock')->name('api.adsense.lock');//锁定
        Route::post('/active', 'AdsenseController@active')->name('api.adsense.active');//激活
    });
    //配置
    Route::group(['prefix' => 'config'], function(){
        Route::get ('/','ConfigController@index')->name('api.config.index');//配置
        Route::post('/update', 'ConfigController@update')->name('api.config.update');//更新
    });
    //网站导航
    Route::group(['prefix' => 'channel'], function(){
        Route::get ('/','ChannelController@index')->name('api.channel.index');//列表
        Route::post('/update', 'ChannelController@update')->name('api.channel.update');//更新
        Route::post('/destroy', 'ChannelController@destroy')->name('api.channel.destroy');//删除
    });

    //SEO
    Route::group(['prefix' => 'seo'], function(){
        Route::get ('/','SeoController@index')->name('api.seo.index');//列表
        Route::post('/update', 'SeoController@update')->name('api.seo.update');//更新
        Route::post('/destroy', 'SeoController@destroy')->name('api.seo.destroy');//删除
    });

    //友情链接
    Route::group(['prefix' => 'link'], function(){
        Route::get ('/','LinkController@index')->name('api.link.index');//列表
        Route::post('/update', 'LinkController@update')->name('api.link.update');//更新
        Route::post('/destroy', 'LinkController@destroy')->name('api.link.destroy');//删除
        Route::post('/lock', 'LinkController@lock')->name('api.link.lock');//锁定
        Route::post('/active', 'LinkController@active')->name('api.link.active');//激活
    });
    //新闻管理
    Route::group(['prefix' => 'article'], function(){
        Route::get ('/','ArticleController@index')->name('api.article.index');//列表
        Route::get('/info', 'ArticleController@info')->name('api.article.info');//详情
        Route::get('/cate', 'ArticleController@cate')->name('api.article.cate');//分类
        Route::post('/update', 'ArticleController@update')->name('api.article.update');//更新
        Route::post('/destroy', 'ArticleController@destroy')->name('api.article.destroy');//删除
    });
    //富润荣誉
    Route::group(['prefix' => 'honor'], function(){
        Route::get ('/','HonorController@index')->name('api.honor.index');//列表
        Route::post('/update', 'HonorController@update')->name('api.honor.update');//更新
        Route::post('/destroy', 'HonorController@destroy')->name('api.honor.destroy');//删除
    });
    //分享管理
    Route::group(['prefix' => 'share'], function(){
        Route::get ('/','ShareController@index')->name('api.share.index');//列表
        Route::get('/info', 'ShareController@info')->name('api.share.info');//详情
        Route::get('/cate', 'ShareController@cate')->name('api.share.cate');//分类
        Route::post('/update', 'ShareController@update')->name('api.share.update');//更新
        Route::post('/destroy', 'ShareController@destroy')->name('api.share.destroy');//删除
    });
    //类目管理
    Route::group(['prefix' => 'category'], function(){
        Route::get ('/','CategoryController@index')->name('api.category.index');//列表
        Route::post('/update', 'CategoryController@update')->name('api.category.update');//更新
        Route::post('/destroy', 'CategoryController@destroy')->name('api.category.destroy');//删除
    });
    //案列管理
    Route::group(['prefix' => 'case'], function(){
        Route::get ('/','CaseController@index')->name('api.case.index');//列表
        Route::get('/info', 'CaseController@info')->name('api.case.info');//详情
        Route::get('/cate', 'CaseController@cate')->name('api.case.cate');//分类
        Route::post('/update', 'CaseController@update')->name('api.case.update');//更新
        Route::post('/destroy', 'CaseController@destroy')->name('api.case.destroy');//删除
    });
    //合作伙伴
    Route::group(['prefix' => 'partner'], function(){
        Route::get ('/','PartnerController@index')->name('api.partner.index');//列表
        Route::post('/update', 'PartnerController@update')->name('api.partner.update');//更新
        Route::post('/destroy', 'PartnerController@destroy')->name('api.partner.destroy');//删除
    });
    //生态伙伴
    Route::group(['prefix' => 'ecology'], function(){
        Route::get ('/','EcologyController@index')->name('api.ecology.index');//列表
        Route::get('/cate', 'EcologyController@cate')->name('api.ecology.cate');//分类
        Route::post('/update', 'EcologyController@update')->name('api.ecology.update');//更新
        Route::post('/destroy', 'EcologyController@destroy')->name('api.ecology.destroy');//删除
    });
    //胜途ERP
    Route::group(['prefix' => 'erp'], function(){
        Route::get ('/','ErpController@index')->name('api.erp.index');//列表
        Route::get('/cate', 'ErpController@cate')->name('api.erp.cate');//分类
        Route::post('/update', 'ErpController@update')->name('api.erp.update');//更新
        Route::post('/destroy', 'ErpController@destroy')->name('api.erp.destroy');//删除
    });
    //成功案例
    Route::group(['prefix' => 'deputy'], function(){
        Route::get ('/','DeputyController@index')->name('api.deputy.index');//列表
        Route::get('/cate', 'DeputyController@cate')->name('api.deputy.cate');//分类
        Route::post('/update', 'DeputyController@update')->name('api.deputy.update');//更新
        Route::post('/destroy', 'DeputyController@destroy')->name('api.deputy.destroy');//删除
    });
    //发展历程
    Route::group(['prefix' => 'course'], function(){
        Route::get ('/','CourseController@index')->name('api.course.index');//列表
        Route::post('/update', 'CourseController@update')->name('api.course.update');//更新
        Route::post('/destroy', 'CourseController@destroy')->name('api.course.destroy');//删除
    });






});
